

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<%@ taglib prefix="e" uri="http://java.sun.com/jsp/jstl/core" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<f:view>
    <html>
        <head>

            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <link rel="stylesheet" type="text/css" href="styl.css"/>
            <title>Bank login</title>
        </head>
        <body>
            <h:form>

                <h1><h:outputText value="Podaj login i hasło"/></h1>
                      <table>
                          <tr><td>Login: </td><td><h:inputText value="#{nowaBean.login}"/></td></tr>
            
           <tr><td>  Haslo: </td><td><h:inputSecret value="#{nowaBean.pass}"/></td></tr>
</table>
            <h:commandButton value="ok" action="#{nowaBean.zaloguj}"/>
           
          
            <e:if test="${!empty nowaBean.nazwa}">

                <e:set scope="session" var="login" value="${nowaBean.nazwa}"/>

             <e:out value="${sessionScope['login']}"/>
             <e:if test="${nowaBean.nazwa!='pass_error'}">
                 <%
                 response.sendRedirect("/nowa/newServlet");
                 %>
             </e:if>
     Zly login lub haslo!
            </e:if> 
            <br>
            Nie masz konta <a href="register.jsp">zarejestruj</a>
            <br>

            <br>
            </h:form>
            <br>
       

        </body>
    </html>
</f:view>
